package eg
{

    // Copyright (c) 2002 Cunningham & Cunningham, Inc.
    // Released under the terms of the GNU General Public License version 2 or later.

import com.fit4as.fit.*;

public class Calculator extends ColumnFixture {

    public var volts : Number;
    public var key : String;

    public static var hp : HP35 = new HP35();

    public function points() : Boolean {
        return false;
    }

    public function flash() : Boolean {
        return false;
    }

    public function watts() : Number {
        return 0.5;
    }

    override public function reset() : void {
        key = null;
    }

    override public function execute() : void {
        if (key != null) {
            hp.key(key);
        }
    }

    public function x() : ScientificDouble {
        return new ScientificDouble(hp.r[0]);
    }

    public function y() : ScientificDouble {
        return new ScientificDouble(hp.r[1]);
    }

    public function z() : ScientificDouble {
        return new ScientificDouble(hp.r[2]);
    }

    public function t() : ScientificDouble {
        return new ScientificDouble(hp.r[3]);
    }
}
}

